/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.miracleteam.miracle.services.servicesImpl;

import com.miracleteam.miracle.dao.DanhMucSanPhamDAO;
import com.miracleteam.miracle.dao.daoImpl.DanhMucSanPhamDAOImpl;
import com.miracleteam.miracle.entities.Danhgiagianhang;
import com.miracleteam.miracle.entities.Danhmucsanpham;
import com.miracleteam.miracle.services.DanhGiaGianHangService;
import com.miracleteam.miracle.services.DanhMucSanPhamService;
import java.util.List;

/**
 *
 * @author DangKhoa
 */
public class DanhMucSanPhamServiceImpl implements DanhMucSanPhamService{

    public Danhmucsanpham LayDMSanPham(String ma) {
        DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
        return dmDao.LayDMSanPham(ma);
    }

    public List LayDanhMucCon(String ma) {
       DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
       return dmDao.LayDanhMucCon(ma);
    }

    public boolean Them(Danhmucsanpham dm) {
        DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
        return dmDao.Them(dm);
    }

    public boolean CapNhat(Danhmucsanpham dm) {
        DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
        return dmDao.CapNhat(dm);
    }

    public String PhatSinhKhoaChinh() {
        DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
        return dmDao.PhatSinhKhoaChinh();
    }
    public List LayDanhMucGoc() {
        DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
        return dmDao.LayDanhMucGoc();
    }

     public Danhmucsanpham LayDMSanPhamTuSanPham(String maSP)
     {
         DanhMucSanPhamDAO dmDao=new DanhMucSanPhamDAOImpl();
       return dmDao.LayDMSanPhamTuSanPham(maSP);
     }
    
}
